package hu.mapro.gwtui.gxt.client.recordseditor.field;

import hu.mapro.gwtui.gxt.client.recordseditor.SortFieldInterface;
import hu.mapro.model.Getter;
import hu.mapro.model.meta.Field;

public class SortFieldAdapter<T, F extends Field&Getter<T, ? extends Comparable<?>>> implements SortFieldInterface<T, F> {

	@Override
	public String getPath(F sortField) {
		return sortField.getName();
	}

	@Override
	public Object getValue(F sortField, T object) {
		return sortField.get(object);
	}

}
